package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 张永远
 * @since 2020-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
//@Accessors(chain = true)
@TableName("t_company")
public class CompanyDo extends Model<CompanyDo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户id 后台用户用 隔离仓库 公司等
     */
    @TableField("tenant_id")
    private Long tenantId;

    /**
     * 客户名
     */
    @TableField("name")
    private String name;

    @TableField("company_code")
    private String companyCode;


    @TableField("company_name")
    private String companyName;

    @TableField("account")
    private String account;

    @TableField("status")
    private int status;


    @TableField("order_history_sync_time")
    private Date orderHistorySyncTime;


    @TableField("create_by")
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;


    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField("contact")
    private String contact;

    @TableField("tel")
    private String tel;
    @TableField("email")
    private String email;

    @TableField("ioss_eu_tax_no")
    private String iossEuTaxNo;

    @TableField("address")
    private String address;

    @TableField("tips")
    private String tips;

    /**
     * 产品免审 0 是 1否
     */
    @TableField("product_free_trial")
    private int productFreeTrial;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
